var mongoose = require("../common/db")

var article = new mongoose.Schema({
	articleTitle: String,
	articleContext: String,
	articleTime: String,
})

article.statics.findByArticleId = function (id, callBack) {
	this.findOne({ _id: id }, callBack)
}

article.statics.findAll = function (callBack) {
	this.find({}, callBack)
}

var articleModel = mongoose.model("Article", article)

module.exports = articleModel
